package com.sg.service.base.framework.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.dto.base.framework.req.*;
import com.sg.entity.StaffingAccount;
import com.sg.service.base.framework.MStaffingAccountService;
import com.wicket.okrframework.common.dto.FieldInfo;
import com.wicket.okrframework.common.exception.BizException;
import com.wicket.okrframework.dal.mapper.mbg.StaffingAccountMapper;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @since 2022/1/19 15:39
 */
@Service
public class MStaffingAccountServiceImpl
        extends ServiceImpl<StaffingAccountMapper, StaffingAccount>
        implements MStaffingAccountService {

    @Autowired
    StaffingAccountMapper staffingAccountMapper;

    /**
     * 1-3-14新增编制账户[171]
     * gen by moon at 10/16/2022, 11:07:45 AM
     */
    @Trace(operationName = "1-3-14新增编制账户")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public String addStaffingAccount(StaffingAccount staffingAccount) {
        staffingAccount.setStaffingAccountId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
        staffingAccount.setIsArchive("FALSE");
        staffingAccount.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        staffingAccount.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        if (staffingAccount != null && staffingAccount.getSubjectLifeCycle() != null && staffingAccount.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            staffingAccount.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
        }
        staffingAccount.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        staffingAccount.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        if (staffingAccount != null && staffingAccount.getSubjectLifeCycle() != null && staffingAccount.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            staffingAccount.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
        }
        staffingAccount.setStatus("FALSE");
        staffingAccount.setIsValid("FALSE");
        staffingAccount.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
        staffingAccount.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
        if (super.save(staffingAccount)) {
            return staffingAccount.getStaffingAccountId();
        } else {
            return "-1";
        }

    }

    /**
     * 1-3-14修改编制账户[172]
     * gen by moon at 10/16/2022, 11:07:45 AM
     */
    @Trace(operationName = "1-3-14修改编制账户")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean updateStaffingAccount(StaffingAccount staffingAccount) {
        staffingAccount.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        if (staffingAccount != null && staffingAccount.getSubjectLifeCycle() != null && staffingAccount.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            staffingAccount.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
        }
        if (staffingAccount != null && staffingAccount.getSubjectLifeCycle() != null && staffingAccount.getSubjectLifeCycle().equals("ARCHIVING")) {
            staffingAccount.setArchiveInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//ARCHIVE_CURRENT_INDUCTIONID
        }
        staffingAccount.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        if (staffingAccount != null && staffingAccount.getSubjectLifeCycle() != null && staffingAccount.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            staffingAccount.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
        }
        if (staffingAccount != null && staffingAccount.getSubjectLifeCycle() != null && staffingAccount.getSubjectLifeCycle().equals("ARCHIVING")) {
            staffingAccount.setArchiveTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
        }
        return super.updateById(staffingAccount);
    }

    /**
     * 1-3-14删除编制账户[173]
     * gen by moon at 10/16/2022, 11:07:46 AM
     */
    @Trace(operationName = "1-3-14删除编制账户")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean deleteStaffingAccount(DeleteStaffingAccountReq reqDto) {

        try {
            Map<String, Object> columnMap = CommonFunctionHelper.objectToMap(reqDto);
            return super.removeByMap(columnMap);
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 1-3-14查询编制账户详情[175]
     * gen by moon at 10/16/2022, 11:07:47 AM
     */
    @Trace(operationName = "1-3-14查询编制账户详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public StaffingAccount queryStaffingAccountDetail(QueryStaffingAccountDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            QueryWrapper<StaffingAccount> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<StaffingAccount> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                StaffingAccount retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 1-3-14查询编制账户列表[176]
     * gen by moon at 10/16/2022, 11:07:48 AM
     */
    @Trace(operationName = "1-3-14查询编制账户列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<StaffingAccount> queryStaffingAccountList(QueryStaffingAccountListReq reqDto) {

        try {
            QueryWrapper<StaffingAccount> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(StaffingAccount.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<StaffingAccount>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 1-3-14批量修改编制账户[906]
     * gen by moon at 10/16/2022, 11:07:48 AM
     */
    @Trace(operationName = "1-3-14批量修改编制账户")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchUpdateStaffingAccount(List<StaffingAccount> staffingAccount) {

        if (staffingAccount == null || staffingAccount.size() == 0) {
            return false;
        }
        return super.saveOrUpdateBatch(staffingAccount);

    }

    /**
     * 1-3-14批量删除编制账户[939]
     * gen by moon at 10/16/2022, 11:07:49 AM
     */
    @Trace(operationName = "1-3-14批量删除编制账户")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchDeleteStaffingAccount(List<String> reqDto) {

        if (reqDto == null || reqDto.size() == 0) {
            return false;
        }

        return super.removeByIds(reqDto);
    }

    /**
     * 1-3-14批量查询编制账户列表[1484]
     */
    @Trace(operationName = "1-3-14批量查询编制账户列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<StaffingAccount> batchQueryStaffingAccountList(BatchQueryStaffingAccountListReq reqDto) {

        try {
            QueryWrapper<StaffingAccount> queryWrapper = new QueryWrapper<>();

            if (reqDto.getStaffingAccountList() == null || reqDto.getStaffingAccountList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("entity_id", reqDto.getStaffingAccountList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<StaffingAccount>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 1-3-14批量新增编制账户[1524]
     * gen by moon at 10/16/2022, 11:07:51 AM
     */
    @Trace(operationName = "1-3-14批量新增编制账户")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchAddStaffingAccount(List<StaffingAccount> staffingAccount) {

        if (staffingAccount == null || staffingAccount.size() == 0) {
            return false;
        }

        return super.saveBatch(staffingAccount.stream().map(item -> {
            item.setStaffingAccountId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
            item.setSubjectLifeCycle("EDITING");
            item.setIsArchive("FALSE");
            item.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
            item.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
            item.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
            item.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
            item.setStatus("FALSE");
            item.setIsValid("FALSE");
            item.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            item.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            return item;
        }).collect(Collectors.toList()));
    }

    /**
     * 1-3-14编制账户数量加值[1771]
     * gen by moon at 10/16/2022, 11:07:51 AM
     */
    @Trace(operationName = "1-3-14编制账户数量加值")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean increaseStaffingAcntNum(StaffingAccount staffingAccount) {
        UpdateWrapper<StaffingAccount> uw = new UpdateWrapper<>();
        uw.eq("staffing_account_id", staffingAccount.getStaffingAccountId());
        uw.setSql("staffing_num = staffing_num + " + staffingAccount.getStaffingNum());//ADD_NUMERICAL
        uw.setSql("vacant_staffing_number = vacant_staffing_number + " + staffingAccount.getVacantStaffingNumber());//ADD_NUMERICAL
        staffingAccount.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        staffingAccount.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        staffingAccount.setStaffingNum(null);
        staffingAccount.setVacantStaffingNumber(null);
        return super.update(staffingAccount, uw);

    }

    /**
     * 1-3-14编制账户数量减值[1772]
     * gen by moon at 10/16/2022, 11:07:52 AM
     */
    @Trace(operationName = "1-3-14编制账户数量减值")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean reduceStaffingAcntNum(StaffingAccount staffingAccount) {
        UpdateWrapper<StaffingAccount> uw = new UpdateWrapper<>();
        uw.eq("staffing_account_id", staffingAccount.getStaffingAccountId());
        uw.setSql("staffing_num = staffing_num - " + staffingAccount.getStaffingNum());//ADD_NUMERICAL
        uw.setSql("vacant_staffing_number = vacant_staffing_number - " + staffingAccount.getVacantStaffingNumber());//ADD_NUMERICAL
        staffingAccount.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        staffingAccount.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        staffingAccount.setStaffingNum(null);
        staffingAccount.setVacantStaffingNumber(null);
        return super.update(staffingAccount, uw);
    }

    /**
     * 1-3-14修改编制在职账户数量[1780]
     * gen by moon at 10/16/2022, 11:07:53 AM
     */
    @Trace(operationName = "1-3-14修改编制在职账户数量")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean updateStaffOnAcntNum(StaffingAccount staffingAccount) {
        UpdateWrapper<StaffingAccount> uw = new UpdateWrapper<>();
        uw.eq("staffing_account_id", staffingAccount.getStaffingAccountId());
        uw.setSql("actual_staffing_number = actual_staffing_number + " + staffingAccount.getActualStaffingNumber());//ADD_NUMERICAL
        staffingAccount.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        staffingAccount.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        staffingAccount.setActualStaffingNumber(null);
        return super.update(staffingAccount, uw);

    }

    /**
     * 1-3-14修改编制空缺账户数量[1781]
     * gen by moon at 10/16/2022, 11:07:54 AM
     */
    @Trace(operationName = "1-3-14修改编制空缺账户数量")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean updateStaffOffAcntNum(StaffingAccount staffingAccount) {
        UpdateWrapper<StaffingAccount> uw = new UpdateWrapper<>();
        uw.eq("staffing_account_id", staffingAccount.getStaffingAccountId());
        uw.setSql("vacant_staffing_number = vacant_staffing_number + " + staffingAccount.getVacantStaffingNumber());//ADD_NUMERICAL
        staffingAccount.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        staffingAccount.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        staffingAccount.setVacantStaffingNumber(null);
        return super.update(staffingAccount, uw);

    }

    /**
     * 1-3-14批量查询归属对象匹配编制账户[1484]
     * gen by moon at 10/16/2022, 11:07:50 AM
     */
    @Trace(operationName = "1-3-14批量查询归属对象匹配编制账户")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<StaffingAccount> batchQueryBelongMatchingStaffingAccount(BatchQueryBelongMatchingStaffingAccountReq reqDto) {

        try {
            QueryWrapper<StaffingAccount> queryWrapper = new QueryWrapper<>();

            if (reqDto.getStaffingAccountList() == null || reqDto.getStaffingAccountList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("entity_id", reqDto.getStaffingAccountList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(StaffingAccount.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<StaffingAccount>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 1-3-14批量查询编制账户[3768]
     * gen by moon at 10/16/2022, 11:07:55 AM
     */
    @Trace(operationName = "1-3-14批量查询编制账户")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<StaffingAccount> batchQueryStaffingAccount(BatchQueryStaffingAccountReq reqDto) {

        try {
            QueryWrapper<StaffingAccount> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            if (reqDto.getStaffingAccountList() == null || reqDto.getStaffingAccountList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("staffing_account_id", reqDto.getStaffingAccountList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(StaffingAccount.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<StaffingAccount>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M1查询编制账户测试列表[4909]
     * gen by moon at 10/16/2022, 11:07:56 AM
     */
    @Trace(operationName = "M1查询编制账户测试列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<StaffingAccount> queryStaffingAccountTestDataList(StaffingAccount staffingAccount) {

        try {
            QueryWrapper<StaffingAccount> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(staffingAccount);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(StaffingAccount.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(StaffingAccount.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<StaffingAccount>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M1批量删编制账户测试[4911]
     * gen by moon at 10/16/2022, 11:07:57 AM
     */
    @Trace(operationName = "M1批量删编制账户测试")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchDeleteStaffingAccountTestData(List<String> reqDto) {

        if (reqDto == null || reqDto.size() == 0) {
            return false;
        }

        return super.removeByIds(reqDto);
    }

}

